package com.g17.virtualpetbackend.service;

import com.g17.virtualpetbackend.entity.Office;
import com.g17.virtualpetbackend.repo.OfficeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

@Service
public class OfficeService {
    @Autowired
    private OfficeRepository officeRepository;

    public Office getOfficeDetail(String office_name){
        return officeRepository.getOfficeDetail(office_name);
    }

    public List<Office> getOffices(){
        return officeRepository.findOffices();
    }


}
